import React from "react";
import lazyLoad from "@/routers/utils/lazyLoad";
import { LayoutIndex } from "@/routers/constant";
import { RouteObject } from "@/routers/interface";

// dashboard 模块
const staffRouter: Array<RouteObject> = [
	{
		element: <LayoutIndex />,
		meta: {
			title: "Dashboard"
		},
		path: "/staff",
		icon: "UsergroupAddOutlined",
		name: "就诊人员",
		children: [
			{
				path: "/staff/list",
				element: lazyLoad(React.lazy(() => import("@/views/niuma/index"))),
				meta: {
					requiresAuth: true,
					title: "页面2",
					key: "embedded"
				},
				icon: "AppstoreOutlined",
				name: "人员列表"
			},
			{
				path: "/staff/add",
				element: lazyLoad(React.lazy(() => import("@/views/niuma/add"))),
				meta: {
					requiresAuth: true,
					title: "新增",
					key: "/staff/edit"
				},
				icon: "AppstoreOutlined",
				name: "新增就诊人员",
				isDetail: true
			},
			{
				path: "/staff/edit",
				element: lazyLoad(React.lazy(() => import("@/views/niuma/edit"))),
				meta: {
					requiresAuth: true,
					title: "新增",
					key: "/staff/edit"
				},
				icon: "AppstoreOutlined",
				name: "编辑就诊人员",
				isDetail: true
			},
			{
				path: "/staff/detail",
				element: lazyLoad(React.lazy(() => import("@/views/niuma/detail"))),
				meta: {
					requiresAuth: true,
					title: "新增",
					key: "/staff/add"
				},
				icon: "AppstoreOutlined",
				name: "就诊人员详情",
				isDetail: true
			},
			{
				path: "/staff/adds",
				element: lazyLoad(React.lazy(() => import("@/views/niuma/adds"))),
				meta: {
					requiresAuth: true,
					title: "新增",
					key: "/staff/adds"
				},
				icon: "AppstoreOutlined",
				name: "新增陪诊记录",
				isDetail: true
			}
		]
	}
];

export default staffRouter;
